package com.chub.study.modules.entity;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 字典信息表
 * </p>
 *
 * @author Chub
 * @since 2023-07-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_dict_info")
@ApiModel(value="TDictInfo", description="字典信息表")
public class TDictInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "记录标识, 自增主键")
    @TableId(value = "RCRD_ID", type = IdType.AUTO)
    private Long rcrdId;

    @ApiModelProperty(value = "生效状态, 0-无效，1-有效")
    @TableField("EFF_STAT")
    private String effStat;

    @ApiModelProperty(value = "维护类型, 0-系统，1-业务")
    @TableField("MNT_TYPE")
    private String mntType;

    @ApiModelProperty(value = "主体机构标识")
    @TableField("SBJ_INST_ID")
    private String sbjInstId;

    @ApiModelProperty(value = "字典类型编号")
    @TableField("DICT_TYPE_CODE")
    private String dictTypeCode;

    @ApiModelProperty(value = "字典类型名称")
    @TableField("DICT_TYPE_NAME")
    private String dictTypeName;

    @ApiModelProperty(value = "字典项编号")
    @TableField("DICT_ITEM_CODE")
    private String dictItemCode;

    @ApiModelProperty(value = "字典项名称")
    @TableField("DICT_ITEM_NAME")
    private String dictItemName;

    @ApiModelProperty(value = "字典项序号")
    @TableField("DICT_ITEM_SRL")
    private Integer dictItemSrl;

    @ApiModelProperty(value = "字典项级别")
    @TableField("DICT_ITEM_LVL")
    private String dictItemLvl;

    @ApiModelProperty(value = "叶子节点")
    @TableField("LEAF_NODE")
    private String leafNode;

    @ApiModelProperty(value = "上级项编号")
    @TableField("SUP_ITEM_CODE")
    private String supItemCode;

    @ApiModelProperty(value = "三方机构标识")
    @TableField("OTH_INST_ID")
    private String othInstId;

    @ApiModelProperty(value = "第三方类型编号")
    @TableField("OTH_TYPE_CODE")
    private String othTypeCode;

    @ApiModelProperty(value = "第三方类型名称")
    @TableField("OTH_TYPE_NAME")
    private String othTypeName;

    @ApiModelProperty(value = "第三方字典项编号")
    @TableField("OTH_ITEM_CODE")
    private String othItemCode;

    @ApiModelProperty(value = "第三方字典项名称")
    @TableField("OTH_ITEM_NAME")
    private String othItemName;

    @ApiModelProperty(value = "创建用户")
    @TableField("CRT_USER_CODE")
    private String crtUserCode;

    @ApiModelProperty(value = "创建时间戳, ISO19")
    @TableField("CRT_TMS")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime crtTms;

    @ApiModelProperty(value = "修改用户")
    @TableField("MOD_USER_CODE")
    private String modUserCode;

    @ApiModelProperty(value = "修改时间戳")
    @TableField("MOD_TMS")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime modTms;

    @ApiModelProperty(value = "删除标志,参见字典:DEL_FLAG")
    @TableField("DEL_FLAG")
    private String delFlag;


}
